if mappy.msgBox ("Graphic test", "This is a test LUA script which generates a new block and graphic and shades it. In 8bit, the palette is set to greyscale. This script has no useful function and is provided so it can be modified for a purpose (see the text file luascr\\Tile graphic test.lua).\n\nRun the script?", mappy.MMB_OKCANCEL, mappy.MMB_ICONQUESTION) == mappy.MMB_OK then
local w = mappy.getValue(mappy.BLOCKWIDTH)
local h = mappy.getValue(mappy.BLOCKHEIGHT)
local depth = mappy.getValue(mappy.BLOCKDEPTH)
if (w == 0) then
mappy.msgBox ("Graphic test", "You need to load or create a map first", mappy.MMB_OK, mappy.MMB_ICONINFO)